//
//  Car.h
//  FunnyRacing
//
//  Created by vy phan on 15/03/2011.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "cocos2d.h"
#import "CCSprite.h"
#import "CCSpriteSheet.h"

@interface Car : CCSprite {
	// Speed of car
	int speed;
	// Solidation of car
	int solid;
	// Acceleration
	int accel;
	// this is the number of degrees that will increase or decrease the car's rotation (angle) when the left or right keys are pressed	
	int rotationStep;
	// max speed
	int maxSpeed;
	// this is the speed limit when going backwards
	int backSpeed;
	// when the car is not accelerated (the UP Key is released), the car will have to slow down smoothly; 
	// the speed will multiply with this value (less than 1); 
	// the lower this value is, the faster the car will slow down
	float speedDecay;
	// name of car
	NSString* code;
	CCSpriteSheet* carSheet;
	// for box2d physic engine
//    b2World *_world;
//    GLESDebugDraw *_debugDraw;
}
- (Car*)initCarWithType:(int)type_;
- (void)animatedCar:(Car*)car_;
- (void)turnRight:(id)sender;
- (void)turnLeft:(id)sender;
- (void)goForward:(id)sender;
- (void)goBackward:(id)sender;
- (void)addBoxBodyForSprite:(CCSprite *)sprite;

@property (readwrite) int speed;
@property (readwrite) int solid;
@property (readwrite) int accel;
@property (readwrite) int rotationStep;
@property (readwrite) int maxSpeed;
@property (readwrite) int backSpeed;
@property (readwrite) float speedDecay;
@property (retain, readwrite) NSString* code;
@property (readwrite, retain) CCSpriteSheet* carSheet;
@end
